/*
 * Header file that specifies: simulation structure and
 * functions to read/write simulation information to a
 * HDF5 formated input/output file.
 */

/*
 * UNITS structure, to keep track of what physical units
 * are we using in the simulation. Care must be taken, as
 * G will ALWAYS be 1.0 for EVERY chosen units. 
 */

struct UNT
{
	/*String containing human readable units*/
	char   L_units[32];
	char   T_units[32];
	char   M_units[32];
	char   V_units[32];

	/*Actual value of L,M,T and V in STANDARD (MKS), SI UNITS*/
	double L_value;
	double M_value;
	double T_value;
	double V_value;

};

struct SIM
{
	/*Number of non-massive particles*/
	long int N_nm_pcles;
	
	/*Number of massive particles*/
	long int N_mm_pcles;
	
	/*Total simulation time, in code units*/
	double   T_time;
	
	/*Maximum timestep*/
	double   max_dt;
	
	/*Minimum timestep*/
	double   min_dt;
	
	/*ETA parameter, associated with integration preccision*/
	double eta;
	
	/*Number of snapshots to be taken*/
	long int snapshots;
	
	/*Numeric tolerance (maximum delta energy)*/
	double   max_dE;
	
	/*Enable CUDA: y or n.*/
	char     use_GPU[4];
	
	/*Enable double precission: y or n*/
	char     use_double[4];
	
	/*Physical world units*/
	struct UNT sim_units;	
};

typedef struct UNT units;
typedef struct SIM sim_p;

void set_units( units *O, FILE *in );



